<template>
	<view @click="toArticle" class="margin-bottom">
		<view>
		<!-- 标题 -->
		<view  style="font-weight: 600;font-size: 36rpx;white-space: nowrap;overflow: hidden;
  text-overflow:ellipsis;">{{art.title}}</view>
		</view>
		<!-- 正文 -->
		<view class="flex justify-between">
		<rich-text style="word-break: break-all; flex:1;display: -webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3;text-overflow: ellipsis; overflow: hidden;height: 180rpx;line-height: 60rpx;" :nodes="art.content"></rich-text>
		<view v-if="art.imglist.length==1" style="width: 250rpx; height: 180rpx;margin-left: 40rpx;">
			<image :src="art.imglist[0]" mode="aspectFill"  style="width: 100%;height: 100%;"></image>
		</view>
		</view>
		<!-- 多张图片 -->
		<view v-if="art.imglist.length>1" class="flex  margin-top margin-bottom-xs">
			<view v-for="(img,index3) in art.imglist" :key="index3" style="width: 250rpx; height: 125rpx;">
				<image :src="img" mode="aspectFit" style="width: 100%;height: 100%;"></image>
			</view>
		</view>
		<!-- 阅读量 -->
		<view>阅读量{{art.viewCount}}</view>
	</view>
</template>

<script>
	export default {
		props: {
			art: Object
		},
		methods:{
			toArticle(){
				this.$Router.push({name:'article',params:{id:this.art.id}})
			},
		}
	}
</script>

<style>
</style>
